import { CustomEnum, AuthButtonGroup } from 'custom/index'

export default class PageListAuthButtonGroup extends AuthButtonGroup {
  public static name: CustomEnum = 'PageListAuthButtonGroup';

  protected btnId = 0
  useItem(auth: null | string = null) {
    const btn = this.add('PageListAuthButton', `PageListAuthButton-${++ this.btnId}`)
    btn.auth(auth)
    return btn
  }
  addItem(auth: null | string = null) {
    this.useItem(auth)
    return this
  }

  end() {
    return this.upto('ListPage')
  }
}
